package com.zhn;


import lombok.extern.slf4j.Slf4j;

@Slf4j(topic = "c.CreateThread2")
public class CreateThread2 {
    public static void main(String[] args) {
        Runnable runnable = new Runnable() {
            public void run(){
                // 要执行的任务
                log.debug("running");
            }
        };
        // 创建线程对象
//        Runnable task2 = () -> log.debug("hello");
        Thread t = new Thread( runnable );
        // 启动线程
        t.start();
        log.debug("running");
    }
}
